package top.abilities.util.token.exceptions;


import top.abilities.util.exceptions.BaseException;

/**
* @author chenxueliang
* @create 2019/4/29 15:13
* @Desc  token异常类
**/
public class TokenException extends BaseException {

   /**
    * 令牌过期
    */
   public final static TokenException  TOKEN_EXPIRE = new TokenException(100000001,"token令牌过期");
   /**
    *申请令牌的IP地址与校验当前请求的校验IP地址不一致
    */
   public final static TokenException  TOKEN_IP_NOT_SECURITY =
           new TokenException(100000002,"申请令牌的IP地址与校验当前请求的校验IP地址不一致");

   public TokenException(){
       this.moduleCode = "fescomany-common";
   }
   public TokenException(int code, String msgFormat, Object... args) {
       super(String.format(msgFormat, args));
       this.code = code;
       this.msg = String.format(msgFormat, args);
   }
   public TokenException(String message, Throwable cause) {
       super(message, cause);
   }

   public TokenException(Throwable cause) {
       super(cause);
   }

   public TokenException(String message) {
       super(message);
   }
}

